package com.pagoda.nerp.trade.dao;

import com.pagoda.nerp.trade.entity.MdQualityRecord;
import java.util.List;
import java.util.Map;

public interface MdQualityRecordDao {

    /**
     * 插入申请记录
     * @param record
     * @return
     */
    int insert(MdQualityRecord record);

    /**
     * 通过Id查询申请记录
     * @param qualityRecordId
     * @return
     */
    MdQualityRecord queryQualityRecordByPrimaryKey(Integer qualityRecordId);

    /**
     * 通过供应商ID查询申请记录列表
     * @return
     */
    List<MdQualityRecord> queryQualityRecordList(Map<String,String> map);

    /**
     * 更新申请记录
     * @param qualityRecord
     * @return
     */
    int updateByPrimaryKey(MdQualityRecord qualityRecord);

    /**
     * 通过code更新质检状态
     * @param qualityRecord
     * @return
     */
    int updateStatusByCode(MdQualityRecord qualityRecord);


    /**
     * 根据状态查询质检记录列表
     * @param qualityStatusWaitTest
     */
    List<MdQualityRecord> queryQualityRecordListByStatus(String qualityStatusWaitTest);


    /**
     * 通过code查询质检记录
     * @param code
     * @return
     */
    MdQualityRecord queryQualityRecordByCode(String code);

    /**
     * 通过code查询质检记录和水果名称
     * @param code
     * @return
     */
    MdQualityRecord queryQualityRecordAndGoodsNameByCode(String code);

}